//
//  Header.h
//  HuiYun
//
//  Created by 刘锦锋 on 16/6/8.
//  Copyright © 2016年 hpx. All rights reserved.
//

#ifndef Header_h
#define Header_h

#define WIDETH  [UIScreen mainScreen].bounds.size.width
#define HEIGHT   [UIScreen mainScreen].bounds.size.height
#ifdef DEBUG

#define ENABLE_ASSERT_STOP          1
#define ENABLE_DEBUGLOG             1
#endif
//personal Picture
#define PICIMG_ARR @"pic_arr"
#define FACEPHOTO @"facePhoto"
#define HEADPHOTO @"headimg"
///个人形象照片
#define PERSON_PIC @"PesronPic"
///头像照片
#define HEAD_PIC @"headPic"
///身份证照片
#define CARD_PIC @"shenfen_card"
///人和身份证
#define CARD_WITH_PEOPLE_PIC @"shenfen_people_card"

///网络获取的字典
#define MY_NET_INFO_DIC @"my_net_info_dic"

///获取最大的我的字典
#define MY_BIGGEST_INFO_DIC @"my_biggest_dic"
///获取别人的字典
#define OTHER_BIGGEST_INFO_DIC @"other_biggest_dic"
///个人资料总的字典key
#define MY_INFO_DIC @"my_info_dic"

#define MY_USERDESC_DIC @"my_userDesc_Dic"
///经济状况字典
#define MY_MONEY_DIC @"my_money_dic"
///择偶的字典
#define MY_ZEOU_DIC @"my_zeou_dic"
///婚姻的字典
#define MY_HUNYINGUANNIAN_DIC @"marriageConcept"
///亲密视角的字典
#define MY_QINGMI_DIC @"closeView"
///约会交往的字典
#define MY_DATE_DIC @"dating"

///另一半的资料字典key
#define OTHER_INFO_DIC @"other_info_dic"

///会员状态KEY
#define MY_VIPSTATUS_KEY @"status"

///存款key
#define CUNKUAN_MONEY_KEY @"depositState"
///昵称key
#define NICHEN_KEY @"userName"
///性别key
#define SEX_KEY @"ssex"
///期望结婚时间key
#define WANT_MARRY_TIME_KEY @"homeMarryTime"
///择偶标准的期望结婚时间
#define OTHER_WANT_MARRYTIME_KEY @"expectWeddingTime"
///生日时间key
#define BIRTH_TIME_KEY @"birthday"
///身高的key
#define TALL_KEY @"height"
///工作所在地key
#define WORK_PLACE_KEY @"workCity"
///年收入key
#define EARN_MONEY_KEY @"incomeYear"
///职业key
#define WORK_KEY @"job"
///结婚情况key
#define MARRY_STATUS @"marryState"
///星座key
#define XINZUO_KEY @"startSign"
///有无子女key
#define HAVE_CHILD_KEY @"childState"
///恋爱经历key
#define LOVE_HISTORY_KEY @"loveExperience"
///学位key
#define STUDY_KEY @"education"
///体重key
#define WEIGHT_KEY @"weight"
///血型key
#define BLOODKIND_KEY @"bloodType"
///籍贯key
#define JIGUAN_KEY @"nativePlace"
///户籍key
#define HUJI_KEY @"householdRegister"
///民族key
#define MIN_ZU_KEY @"nation"
///信仰key
#define XIN_YANG_KEY @"belief"
///吸烟key
#define SMOKE_KEY @"smoke"
///喝酒key
#define DRUNK_KEY @"drink"
///另一半喝酒情况
#define OTHER_DRINK_KEY @"drinkSituation"
///另一半抽烟情况
#define OTHER_SOMKE_KEY @"smokeSituation"
///房产key
#define HOUSE_KEY @"houseState"
///私家用车
#define CAR_PRICE_KEY @"carState"
///私家车认证
#define SIJICHE_REN_ZHEN_KEY @"sijia_renzhen"
///房产认证
#define HOUSE_REN_ZHEN_KEY @"zichan_renzhen"
///外形key
#define LOOKLIKE_KEY @"appearance"
///年龄key
#define OLD_KEY @"age"
///婚后要求key
#define AFTER_MARRY_KEY @"marriedLife"
///寻找的她（他）应该是一位(多选)key
#define FIND_OTHER_PEOPLE_MUST_BE_KEY @"partnerStatus"
///婚前子女key
#define MARRY_WITH_CHILD_KEY @"premarryChildRequire"
///为爱迁居
#define MARRY_MOVE_WITH_LOVE_KEY @"migration"
///婚姻态度
#define MARRY_TAIDU_KEY @"marriageAttitude"
///婚后关系
#define MARRY_AFTER_KEY @"marriedRelation"
///婚后异性密友
#define MARRY_AFTER_FRIEND_KEY @"attitudeToSexfriend"
///婚后想要小孩吗
#define MARRY_AFTER_WANT_CHILD_KEY @"marriedChildRequire"
///婚后教育小孩
#define MARRY_AFTER_CHILD_EDU_KEY @"marriedChildEducate"
///发现另一半有一夜情怎处理
#define MARRY_FIND_OTHER_NINGHT_KEY @"marriedDerailment"
///婚后家务
#define MARRY_AFTER_HOME_WORK_KEY @"marriedHousework"
///家庭卫生
#define MARRY_FAMILY_CLEAN_KEY @"familyHygiene"
///婚后消费观念
#define MARRY_AFTER_BUY_GUANNIAN_KEY @"marriedConsumption"
///对方家庭重要吗
#define MARRY_FAMILY_IMPORTANT_KEY @"otherFamilyRequire"
///工作态度
#define MARRY_WORK_TAIDU_KEY @"workingAttitude"
///喜欢养宠物吗
#define MARRY_LIKE_PET_KEY @"keepPetsAttitude"
///婚后跟父母的家庭关系
#define MARRY_WITH_PARENTS_KEY @"marriedParentsRelation"
///希望婚后朋友生活圈
#define MARRY_HOPE_FRIEND_KEY @"marriedFriends"
///认为两人相处最重要是(多选)
#define MARRY_TWO_MOSTIMPORTANT_KEY @"importantOfTogether"
///最看重对方那一点(多选)
#define MARRY_ONE_MOSTIMPORTANT_KEY @"importantOfOther"
///您认为自己性感吗？
#define THINK_YOUR_SEX_KEY @"sexy"
///认为性感主要体现在那些方面？
#define THINK_SEX_WHATWAY_KEY @"sexyAspects"
///性爱方面经验
#define THINK_SEX_EXP_KEY @"sexExperience"
///对待性爱态度
#define THINK_SEX_TAIDU_KEY @"sexAttitude"
///性爱中尝试新姿势态度
#define THINK_SEX_NEW_ZISHI_KEY @"sexNewpostureAttitude"
///认为性和爱的关系
#define THINK_SEX_LOVE_KEY @"sexLoveRelation"
///对方调动你的性致主要是(多选)
#define THINK_INTEREST_KEY @"partnerAttractivePoint"
///能够接受伴侣(多选)
#define THINK_CAN_PARTNER_KEY @"acceptPartner"
///初次约会希望做什么(多选)
#define FIRST_MEET_DO_KEY @"firstDating"
///约会谁买单
#define FIRST_MEET_WHOPAY_KEY @"datingPay"
///喜欢的约会场所(多选)
#define FIRST_MEET_LIKEPLACE_KEY @"datingSites"
///交往中最浪漫的事情(多选)
#define FIRST_MEET_ROMANCE_KEY @"romanticThings"
///感兴趣话题(多选)
#define FIRST_MEET_INTEREST_TALK_KEY @"interestTopics"
///愿意参与的体育运动(多选)
#define WILLING_TO_SPORT_KEY @"interestSports"
///我的优势
#define MY_ADVANTAGE_KEY @"strength"
///朋友看我
#define FRIEND_LOOKME_KEY @"friendsThought"
///联系方式字典
#define CONTANCT_DIC_KEY @"contact"
///手机号
#define CELLPHONE_KEY @"cellphone"
///微信号
#define WECHAT_KEY @"wechat"
///qq号
#define QQ_KEY @"qq"
#define CFNULL [NSNull class]

/////另一半结婚时间
//#define OTHER_MARRY_TIME @"other_marry_time"
//#define OTHER_WORK_PLACE @"other_work_place"
//#define OTHER_STUDY_LEVEL @"other_study_level"
//#define OTHER_OLD @"other_old"
//#define OTHER_HOW_TALL @"other_tall"
//#define OTHER_LOOKLIKE @"other_looklike"
//#define OTHER_LIVE_PLACE @"other_live_place"
//#define OTHER_YEAR_MONEY @"other_year_money"
//#define OTHER_MARRY_STATUS @"other_marry_status"


#define kAlipay_Notify_Url        @"http://www.ileiqie.com/faqi/Notify"

//#define AppScheme @"fatrip"
//合作身份者id，以2088开头的16位纯数字
#define PartnerID @"2088221600209248"//   //2088911701259863  //2088221600209248
//收款支付宝账号
#define SellerID  @"zfb@dabanwan.com"

//商户私钥，自助生成
#define PartnerPrivKey @"MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAM4Q4zThiPCyhA3c/9lYkKXkqtIycen28ErnaULQJ4nDTNWjwzfQdpkw+664yn/atRMLPqa0UVq/AN6hkep1IsZc493iwcuEXQ0lGB/nRD9dpjIQLLMmbzWsG1yattBHzcZ9sifJUTuFVuwe/mLmX+4BNVnqf0bU3CRsNpxvs11RAgMBAAECgYEAvSJS6B55ijLPccn+KodXfGw9PWB/nbbBJn7v5hsXryJKS2xbqcb0k/aZiuyhMGiU+j2/61JluVzGd5DkVMXee3vyggnTk2w98xWUsX2mKZq0qH7Wgi+kysGhGwtgUWeHz+UrAR28FONalHte0yUySCgG+5gnNTTxLUVyu5/VhgECQQD2OCNOweQSu0raWThaniXTWPxFGoG2Ga5znnXYgtLJQNhX+8uMQr34sbrOzX8sSnHAZ7j1IqLSai/Hg3Wl9M7ZAkEA1kBrxlTURrFSQxYI8ItgQJjZX+Uk/EWeNYsc+f3v6QKzmWRZIxcyAFbrSYDwyKrCT+x+ePEhl3Epwz1yObhnOQJBAKIA4/JhDuDoTOMIC1VMc1TxWuNZAnm/whIe9CkmQuzadr7FVPOPwpFM175UZdXNkbToSkE4retGpPNgYtt0DVkCQF+DGIiyCG/7XNDLYfDaMW6atU0qufI8lusHuUM5EVqu+aHIOnSKQqAkH4AFG1JZzYYTx83isTbyG8wN+H4C1wECQAd83yUwagpkrNiaKk524Xr85bHXD7JNuzOFpozncK8Rvy1Bx6sKp9ci9+6vXT0e4PMn0xHQbsYBQpp0Uvfy+u8="


//微信支付
#define WeChatAppID @"wx52d1210c78e9d97a"
#define WeChatAppsecret @"944aedc8531048c601baadaa4fb3198b"
#define WeChatPartnerId @"1267210901"

// assert
#ifdef ENABLE_ASSERT_STOP
#define APP_ASSERT_STOP                     {LogRed(@"APP_ASSERT_STOP"); NSAssert1(NO, @" \n\n\n===== APP Assert. =====\n%s\n\n\n", __PRETTY_FUNCTION__);}
#define APP_ASSERT(condition)               {NSAssert(condition, @" ! Assert");}
#else
#define APP_ASSERT_STOP                     do {} while (0);
#define APP_ASSERT(condition)               do {} while (0);
#endif


/////////////////////////////////////////////////////////////////////////////////////
#pragma mark - Redefine

#define ApplicationDelegate                 ((BubblyAppDelegate *)[[UIApplication sharedApplication] delegate])
#define UserDefaults                        [NSUserDefaults standardUserDefaults]
#define SharedApplication                   [UIApplication sharedApplication]
#define Bundle                              [NSBundle mainBundle]
#define MainScreen                          [UIScreen mainScreen]
#define ShowNetworkActivityIndicator()      [UIApplication sharedApplication].networkActivityIndicatorVisible = YES
#define HideNetworkActivityIndicator()      [UIApplication sharedApplication].networkActivityIndicatorVisible = NO
#define NetworkActivityIndicatorVisible(x)  [UIApplication sharedApplication].networkActivityIndicatorVisible = x
#define SelfNavBar                          self.navigationController.navigationBar
#define SelfTabBar                          self.tabBarController.tabBar
#define SelfNavBarHeight                    self.navigationController.navigationBar.bounds.size.height
#define SelfTabBarHeight                    self.tabBarController.tabBar.bounds.size.height
#define ScreenRect                          [[UIScreen mainScreen] bounds]
#define ScreenWidth                         [[UIScreen mainScreen] bounds].size.width
#define ScreenHeight                        [[UIScreen mainScreen] bounds].size.height
#define TouchHeightDefault                  44
#define TouchHeightSmall                    32
#define ViewWidth(v)                        v.frame.size.width
#define ViewHeight(v)                       v.frame.size.height
#define ViewX(v)                            v.frame.origin.x
#define ViewY(v)                            v.frame.origin.y
#define SelfViewHeight                      self.view.bounds.size.height
#define RectX(f)                            f.origin.x
#define RectY(f)                            f.origin.y
#define RectWidth(f)                        f.size.width
#define RectHeight(f)                       f.size.height
#define RectSetWidth(f, w)                  CGRectMake(RectX(f), RectY(f), w, RectHeight(f))
#define RectSetHeight(f, h)                 CGRectMake(RectX(f), RectY(f), RectWidth(f), h)
#define RectSetX(f, x)                      CGRectMake(x, RectY(f), RectWidth(f), RectHeight(f))
#define RectSetY(f, y)                      CGRectMake(RectX(f), y, RectWidth(f), RectHeight(f))
#define RectSetSize(f, w, h)                CGRectMake(RectX(f), RectY(f), w, h)
#define RectSetOrigin(f, x, y)              CGRectMake(x, y, RectWidth(f), RectHeight(f))
#define Rect(x, y, w, h)                    CGRectMake(x, y, w, h)
#define DATE_COMPONENTS                     NSYearCalendarUnit|NSMonthCalendarUnit|NSDayCalendarUnit
#define TIME_COMPONENTS                     NSHourCalendarUnit|NSMinuteCalendarUnit|NSSecondCalendarUnit
#define FlushPool(p)                        [p drain]; p = [[NSAutoreleasePool alloc] init]
#define RGBA(r, g, b, a)                    [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
#define StatusBarHeight                     [UIApplication sharedApplication].statusBarFrame.size.height
#define SelfDefaultToolbarHeight            self.navigationController.navigationBar.frame.size.height
#define IOSVersion                          [[[UIDevice currentDevice] systemVersion] floatValue]
#define IsiOS7Later                         !(IOSVersion < 7.0)

#define Size(w, h)                          CGSizeMake(w, h)
#define Point(x, y)                         CGPointMake(x, y)


#define TabBarHeight                        49.0f
#define NaviBarHeight                       44.0f
#define HeightFor4InchScreen                568.0f
#define HeightFor3p5InchScreen              480.0f

#define ViewCtrlTopBarHeight                (IsiOS7Later ? (NaviBarHeight + StatusBarHeight) : NaviBarHeight)
#define IsUseIOS7SystemSwipeGoBack          (IsiOS7Later ? YES : NO)




//////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark - app define


#define Is4Inch                                 [UtilityFunc is4InchScreen]
#define SIZE_TextSmall                          10.0f
#define SIZE_TextContentNormal                  13.0f
#define SIZE_TextTitleMini                      15.0f
#define SIZE_TextTitleNormal                    17.0f
#define SIZE_TextLarge                          16.0f
#define SIZE_TextHuge                           18.0f


#define KEYWindow (UIView*)[[[UIApplication sharedApplication]delegate]window]

// 颜色配置
#define RGB(r, g, b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1.0]
#define KHListSelColor [UIColor blackColor]

#define Api_version @"01"
#define InCommingCall @"InComingCall"
#define kurl @"http://apiv.beloved999.com/"
#define kUMappKey @"560253cf67e58e46d400373a" //友盟(UMSocial) APPkey

#define kIS_4_Inch              (ScHeight == 568 ? YES : NO)
#define kHIsIos7 ([[UIDevice currentDevice].systemVersion floatValue] >= 7.0)       //是否为ios7
#define ScWidth [[UIScreen mainScreen] bounds].size.width
#define ScHeight [[UIScreen mainScreen] bounds].size.height


// 用户相关
#define USERINFO                  @"userInfo"        // 用户信息
#define USERNAME                  @"username"        // 用户名
#define USERID                    @"id"         // 用户ID
#define USERPOWER                 @"power"           // 权限
#define USERPHONE                 @"member_mobile"          // 用户手机号码
#define USERSESSION               @"sessionkey"
#define checkUserLogin(token) ( (token) == NULL || [(token) isEqualToString:@""] ? NO:YES)
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

#define COLOR(R, G, B, A) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:A]
#define Blue_Color UIColorFromRGB(0x3385ff)
#define Gray_Color UIColorFromRGB(0x757575)
#define Black_Color UIColorFromRGB(0x212121)
#define BackGround_Color UIColorFromRGB(0xeff0f4)
#define line_Color UIColorFromRGB(0xbfbfbf)
#define red_Color UIColorFromRGB(0xeb4f38)

#define NULLObject  ([NSNull null])

//model
#define DICT(key) myDic[key]!=NULLObject?myDic[key]:@"未填写"

#define ALIPAY @"alipay"
#define WXPAY @"wxpay"

#endif /* Header_h */
